package com.lvy.hczn.front.system.domain.business;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.lvy.hczn.front.common.core.domain.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 运输单主信息
 *
 * @author yw
 * @date 2023-08-26 19:31:16
 **/
@Data
@TableName("transport")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "运输单主信息")
public class Transport extends BaseModel<Transport> {

    @ApiModelProperty(value = "预约取货结束时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime appointPickupEndTime;

    @ApiModelProperty(value = "预约取货开始时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime appointPickupTime;

    @ApiModelProperty(value = "货箱数量")
    private Integer cartonNum;

    @ApiModelProperty(value = "配送费")
    private BigDecimal deliveryFee;

    @ApiModelProperty(value = "配送服务费")
    private BigDecimal deliveryServiceFee;

    @ApiModelProperty(value = "配送商Uid")
    private String deliveryUid;

    @ApiModelProperty(value = "配送商Nid")
    private String deliveryUserId;

    @ApiModelProperty(value = "配送商id")
    private String enterpriseId;

    @ApiModelProperty(value = "是否异常：0：否；1：是")
    private Integer isErr;

    @ApiModelProperty(value = "是否超时：0：否；1：是")
    private Integer isTimeout;

    @ApiModelProperty(value = "最晚到达时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime latestArriveTime;

    @ApiModelProperty(value = "状态:0:待分拣,1:待取货,2:配送中,3:已送达,4:已关闭")
    private Integer status;

    @ApiModelProperty(value = "总数量")
    private Integer totalNum;

    @ApiModelProperty(value = "总体积")
    private BigDecimal totalVolume;

    @ApiModelProperty(value = "总重量")
    private BigDecimal totalWeight;

    @ApiModelProperty(value = "运输单号")
    private String transportCode;

    @ApiModelProperty(value = "运输类型:0:调拨运输,1:混合运输")
    private Integer transportType;

    @ApiModelProperty(value = "运输明细")
    @TableField(exist = false)
    private List<TransportDetail> detailList;

    @ApiModelProperty(value = "是否删除：0：否；1：是")
    @TableField(exist = false)
    private Integer isDelete;

}
